<template>
	<view :style="themeColor">
		<view class="page">
			<view
				class="flex benben-position-layout flex flex-wrap align-center littleTheatre_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }"
			>
				<view class='flex flex-wrap align-center justify-between flex-sub littleTheatre_fd0_0'>
					<view
						class='flex flex-wrap align-center littleTheatre_fd0_0_c0'
						@tap.stop="handleJumpDiy"
						data-type="back"
						data-url="1"
					>
						<text class='fu-iconfont2  littleTheatre_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex flex-wrap align-stretch justify-center'>
						<text
							class='littleTheatre_fd0_0_c1_c0'
							style="font-family: Alimama DongFangDaKai, Alimama DongFangDaKai;"
						>沉浸小剧场</text>
					</view>
					<view class='flex flex-wrap align-center justify-end littleTheatre_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<view
				class="loading_css"
				v-if="isShow"
			>
				<u-loading
					size="36"
					color="#AD3823"
				></u-loading>
				<view>加载中</view>
			</view>
			<block v-else>
				<!---flex布局flex布局开始-->
				<view class="flex benben-flex-layout flex-wrap align-center littleTheatre_flex_1">
					<view class='flex flex-direction flex-wrap align-stretch littleTheatre_fd1_0'>
						<text class='littleTheatre_fd1_0_c0'>小剧场简介：</text>
						<view class='littleTheatre_fd1_0_c1'>
							<u-parse :html="course_desc"></u-parse>
						</view>
					</view>
				</view>

				<!---flex布局flex布局结束-->
				<!---flex布局flex布局开始-->
				<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
					<view class='flex flex-direction flex-wrap align-stretch littleTheatre_fd2_0'>
						<view class='flex flex-wrap align-center littleTheatre_fd2_0_c0'>
							<text class='littleTheatre_fd2_0_c0_c0'>沉浸体验：</text>
						</view>
						<view
							class='flex flex-direction flex-wrap align-stretch littleTheatre_fd2_0_c1'
							v-for="(item, index) in list"
							:key="index"
							:style="{backgroundImage: 'url(' + item.image + ')'}"
						>
							<image
								class='littleTheatre_fd2_0_c1_c0'
								mode="aspectFill"
								:src='STATIC_URL+"515.png"'
							>
							</image>
							<view class='flex flex-direction flex-wrap align-center littleTheatre_fd2_0_c1_c1'>
								<text class='littleTheatre_fd2_0_c1_c1_c0'>{{item.name}}{{item.nums}}个</text>
								<text class='littleTheatre_fd2_0_c1_c1_c1'>（{{item.category_name}}）</text>
							</view>
							<view
								class='flex flex-wrap align-center justify-center littleTheatre_fd2_0_c1_c2_c0'
								v-if="item.is_buy == 0"
								@tap.stop="goBuyCourse(item)"
							>
								<text class='littleTheatre_fd2_0_c1_c2_c0_c0'>立即解锁</text>
							</view>
							<view
								class='flex flex-wrap align-center justify-center littleTheatre_fd2_0_c1_c2_c0'
								v-if="item.is_buy == 1"
								@tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/shouye/buyOffline/buyOffline?order_sn=${item.order_sn}`"
							>
								<text class='littleTheatre_fd2_0_c1_c2_c0_c0'>去学习</text>
							</view>
							
						</view>
					</view>
				</view>
			</block>

		</view>
	</view>
</template>
<script>
	export default {
		components: {},


		data() {
			return {
				isShow: true,
				course_desc: "",
				list: [],
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getCourse_desc();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.getData();
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			// 小剧场简历  6554aee801b99
			getCourse_desc() {
				this.$api.post(global.API_VERSION + '6554aee801b99', {

				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						this.course_desc = res.data.data.course_desc;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 沉浸小剧场  6554af27b84fd
			getData() {
				this.$api.post(global.API_VERSION + '6554af27b84fd', {

				}).then(res => {
					// console.log(res);
					this.isShow = false;
					if (res.data.code == 1) {
						this.list = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 购买
			goBuyCourse(item) {
				console.log(item);
				let course_name = item.name + item.nums + '个' + '(' + item.category_name + ')';
				uni.navigateTo({
					url: '/pages/shouye/buyNow/buyNow?course_name=' + course_name + '&aid=' + item.aid +
						'&price=' + item.price
				})
			},
		}
	};
</script>
<style
	lang="scss"
	scoped
>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: url(https://www.guochaoxiaoju.com/uploads/mini/513.png) no-repeat;
		background-size: 100% auto;
	}

	.littleTheatre_flex_0 {
		/* background: url(https://www.guochaoxiaoju.com/uploads/mini/513.png) no-repeat; */
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		/* background-size: 100% auto !important; */
	}

	.littleTheatre_fd0_0_c1_c0 {
		font-size: 40rpx;
		font-weight: 400;
		color: #FFFFFF;
		line-height: 88rpx;
	}

	.littleTheatre_fd0_0_c0_c0 {
		font-size: 36rpx;
		color: var(--benbenFontColor3);
	}

	.littleTheatre_fd0_0_c0 {
		width: 120rpx;
	}

	.littleTheatre_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.littleTheatre_flex_1 {
		padding: 39rpx 30rpx 0rpx 30rpx;
	}

	.littleTheatre_fd1_0_c1 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 400;
		line-height: 50rpx;
	}

	.littleTheatre_fd1_0_c0 {
		color: #333333;
		font-size: 40rpx;
		font-weight: 400;
		margin: 0rpx 0rpx 20rpx 0rpx;
	}

	.littleTheatre_fd1_0 {
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		width: 690rpx;
		padding: 32rpx 24rpx 32rpx 24rpx;
		margin: 0rpx 0rpx 30rpx 0rpx;
	}

	.littleTheatre_fd2_0_c7 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/518.png) no-repeat;
		background-size: 100% auto;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.littleTheatre_fd2_0_c6 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/519.png) no-repeat;
		background-size: 100% auto;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.littleTheatre_fd2_0_c5 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/517.png) no-repeat;
		background-size: 100% auto;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.littleTheatre_fd2_0_c4 {
		background: url(https://www.guochaoxiaoju.com/uploads/mini/516.png) no-repeat;
		background-size: 100% auto;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}

	.littleTheatre_fd2_0_c1_c2_c0_c0 {
		color: #AD3823;
		font-size: 28rpx;
		font-weight: 400;
	}

	.littleTheatre_fd2_0_c1_c2_c0 {
		background: #FFFFFF;
		width: 144rpx;
		height: 52rpx;
		// transform: translateY(-12rpx);
		position: absolute;
		bottom: 0;
		right: 0;
		border-radius: 24rpx 16rpx 0 0;
	}

	.littleTheatre_fd2_0_c1_c1_c1 {
		color: #333333;
		font-size: 34rpx;
		font-weight: 400;
		margin: 15rpx 0rpx 4rpx 0rpx;
	}

	.littleTheatre_fd2_0_c1_c1_c0 {
		color: #333333;
		font-size: 48rpx;
		font-weight: 400;
	}

	.littleTheatre_fd2_0_c1_c1 {
		margin: 56rpx 0rpx 0rpx 0rpx;
	}

	.littleTheatre_fd2_0_c1_c0 {
		width: 56rpx;
		height: 56rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		position: absolute;
		left: 24rpx;
		top: 24rpx;
	}

	.littleTheatre_fd2_0_c1 {
		// background: url(https://www.guochaoxiaoju.com/uploads/mini/514.png) no-repeat;
		background-size: 100% 220rpx;
		background-repeat: no-repeat;
		position: relative;
		margin: 0rpx 0rpx 24rpx 0rpx;
		height: 220rpx;
	}

	.littleTheatre_fd2_0_c0_c0 {
		color: #333333;
		font-size: 40rpx;
		font-weight: 400;
	}

	.littleTheatre_fd2_0_c0 {
		padding: 24rpx 0rpx 24rpx 0rpx;
	}

	.littleTheatre_fd2_0 {
		background: #F7F6F4;
		border-radius: 32rpx 32rpx 0rpx 0rpx;
		padding: 0rpx 30rpx 0rpx 30rpx;
	}
</style>

<style>
	page {
		font-family: Alimama DongFangDaKai;
	}
</style>